package com.pethome.web.service.impl;

import com.pethome.web.domain.Shelter;
import com.pethome.web.mapper.ShelterMapper;
import com.pethome.web.service.IShelterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 收容管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-08-26
 */
@Service
public class ShelterServiceImpl implements IShelterService 
{
    @Autowired
    private ShelterMapper shelterMapper;

    /**
     * 查询收容管理
     * 
     * @param shelterId 收容管理主键
     * @return 收容管理
     */
    @Override
    public Shelter selectShelterByShelterId(Long shelterId)
    {
        return shelterMapper.selectShelterByShelterId(shelterId);
    }

    /**
     * 查询收容管理列表
     * 
     * @param shelter 收容管理
     * @return 收容管理
     */
    @Override
    public List<Shelter> selectShelterList(Shelter shelter)
    {
        return shelterMapper.selectShelterList(shelter);
    }

    /**
     * 新增收容管理
     * 
     * @param shelter 收容管理
     * @return 结果
     */
    @Override
    public int insertShelter(Shelter shelter)
    {
        return shelterMapper.insertShelter(shelter);
    }

    /**
     * 修改收容管理
     * 
     * @param shelter 收容管理
     * @return 结果
     */
    @Override
    public int updateShelter(Shelter shelter)
    {
        return shelterMapper.updateShelter(shelter);
    }

    /**
     * 批量删除收容管理
     * 
     * @param shelterIds 需要删除的收容管理主键
     * @return 结果
     */
    @Override
    public int deleteShelterByShelterIds(Long[] shelterIds)
    {
        return shelterMapper.deleteShelterByShelterIds(shelterIds);
    }

    /**
     * 删除收容管理信息
     * 
     * @param shelterId 收容管理主键
     * @return 结果
     */
    @Override
    public int deleteShelterByShelterId(Long shelterId)
    {
        return shelterMapper.deleteShelterByShelterId(shelterId);
    }
}
